﻿<div id="uploadarea" style="padding-bottom:10px;">
    <div>
        <div>
            <h4 style="color:{{updcolor}}">
                <label id="updAreaShow" class="modal-title" style="display:none; cursor:pointer;" ng-click="show('upload')">
                    <i class="fa fa-plus-square-o">&nbsp;UPLOAD AREA</i>
                </label>
                <label id="updAreaHide" class="modal-title" style="cursor:pointer;" ng-click="hide('upload')">
                    <i class="fa fa-minus-square-o">&nbsp;UPLOAD AREA</i>
                </label>
            </h4>
        </div>
        <table id="tblUploadArea" style="border: 1px #ececec solid; background-color: white; width: 1160px;">
            <tr>
                <td style="width:50%">
                    <table style="margin-left:20px;">
                        <tr style="height:45px">
                            <td>
                                <label for="File">Account Level File</label>
                                <div>
                                    <div style="float:left">
                                        <input type="file" id="updAccountFile" style="width:300px" nv-file-select="" uploader="uploader" />
                                    </div>
                                    <div style="float:left">
                                        <a style="text-decoration:underline" ng-click="clearInfo('updAccountFile')">Clear</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr style="height:45px">
                            <td>
                                <label for="File">Invoice Level File</label>
                                <div>
                                    <div style="float:left">
                                        <input type="file" id="updInvoiceFile" style="width:300px" nv-file-select="" uploader="uploader" />
                                    </div>
                                    <div style="float:left">
                                        <a style="text-decoration:underline" ng-click="clearInfo('updInvoiceFile')">Clear</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr style="height:10px"></tr>
                        <tr style="height:50px">
                            <td>
                                <label for="File">One-Year Sales File</label>
                                <div>
                                    <div style="float:left">
                                        <input type="file" id="updOneYearSalesFile" style="width:300px" nv-file-select="" uploader="uploader" />
                                    </div>
                                    <div style="float:left">
                                        <a style="text-decoration:underline" ng-click="clearInfo('updOneYearSalesFile')">Clear</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr style="height:40px">
                            <td>
                                <button type="button" class="btn-dpupload fa fa-upload" ng-click="updateLevel()">&nbsp;Upload</button>
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="width:50%; padding-right:20px; padding-bottom:10px; padding-top:10px;">
                    <span>Current Period:</span>
                    <label id="currentPeriodTime"></label>
                    <div class="smallgrid-style" style="height:171px;" ui-grid="legalEntityCount" ui-grid-resize-columns>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>
<div id="submitarea" style="padding-bottom:10px;">
    <div>
        <h4 style="color:{{submitcolor}}">
            <label id="updSubmitComfirmShow" class="modal-title" style="display:none; cursor:pointer;" ng-click="show('submit')">
                <i class="fa fa-plus-square-o">&nbsp;SUBMIT COMFIRM</i>
            </label>
            <label id="updSubmitComfirmHide" class="modal-title" style="cursor:pointer;" ng-click="hide('submit')">
                <i class="fa fa-minus-square-o">&nbsp;SUBMIT COMFIRM</i>
            </label>
        </h4>
    </div>
    <table id="tblSubmitComfirm" style="border: 1px #ececec solid; background-color: white; width:1140px;">
        <tr>
            <td>
                <div style="width:100%; height:50px;">
                    <div id="buttonMenu" class="btn-group" data-toggle="buttons" style="float:left; margin-left:20px; margin-top:10px;">
                        <!--<label class="btn btn-primary" ng-model="isAging" ng-click="showAging()" btn-checkbox>Aging Report</label>
                        <label class="btn btn-primary" ng-model="isOneYear" ng-click="showOneYear()" btn-checkbox>One-Year Sales</label>-->
                        <button class="btn-soadrop dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                            {{dropdownvalue}}
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                            <li id="liaging"><a href="" ng-click="showAging()">Aging Report</a></li>
                            <li id="lione"><a href="" ng-click="showOneYear()">One-Year Sales</a></li>
                        </ul>
                    </div>
                    <div style="float:left; margin-top:10px;">
                        <button id="btnSubmit" class="btn-filter" ng-click="submit('Aging')" ng-show="isShow">
                            <img src="~/../Content/images/Execute.png" />&nbsp;&nbsp;Submit
                        </button>
                        <button id="btnOneYearSubmit" class="btn-filter" ng-click="submit('OneYearSalse')" ng-show="isOneYearShow">
                            <img src="~/../Content/images/Execute.png" />&nbsp;&nbsp;Submit
                        </button>
                    </div>
                </div>
                <div id="search" ng-show="isShow">
                    <div style="padding-bottom:10px; margin-left:20px; margin-right:20px;">
                        <table style="width:1120px;">
                            <tr>
                                <td style="width:50%">
                                    <table style="background-color:#ececec; width:97%;">
                                        <tr>
                                            <td style="height:40px; padding-left:10px;">
                                                <label for="inputCustCode">Customer Code</label>
                                                <div>
                                                    <input id="inputCustCode" class="form-control input-sm" ng-model="custCode" />
                                                </div>
                                            </td>
                                            <td style="height:40px; padding-left:10px;">
                                                <label for="inputCustName">Customer Name</label>
                                                <div>
                                                    <input id="inputCustName" class="form-control input-sm" ng-model="custName" />
                                                </div>
                                            </td>
                                            <td>
                                                <div style="padding-top:20px; padding-left:10px;">
                                                    <button id="btnSearch" class="filter-button" ng-click="search()">Search</button>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height:40px; padding-left:10px;">
                                                <label for="inputLegal">Legal Entity</label>
                                                <div>
                                                    <select id="Legal" class="form-control input-sm" ng-model="legal" ng-options="d.legalEntity as d.legalEntity for d in legallist">
                                                        <option value="">All</option>
                                                    </select>
                                                </div>
                                            </td>
                                            <td style="height:40px; padding-left:10px;">
                                                <label for="inputStatus">Account Status</label>
                                                <select id="inputStatus" class="form-control input-sm" ng-model="status" ng-options="a.detailValue as a.detailName for a in bdHoldstatus">
                                                    <option value="">All</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height:40px; padding-left:10px;">
                                                <input id="ckbMasterData" type="checkbox" name="missMasterData" />
                                                <label for="checkMissMasterData" style="font-size:15px">Miss Master Data</label>
                                            </td>
                                            <!--<td style="height:40px; padding-right:10px;" colspan="2">
                                                <input id="ckbAccountData" type="checkbox" name="missAccountData">
                                                    <lable for="checkMissAccountData" style="font-size:15px">Miss Account Data</lable>
                                                </input>
                                            </td>-->
                                            <td style="height:40px; padding-left:10px;">
                                                <input id="ckbInvoiceData" type="checkbox" name="missInvoiceData" />
                                                <label for="checkMissInvoiceData" style="font-size:15px">Miss Invoice Data</label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height:40px; padding-left:10px;" colspan="2">
                                                <input id="ckbTotalAmountNotEqual" type="checkbox" name="totalAmountNotEqual" />
                                                <label for="checkTotalAmountNotEqual" style="font-size:15px">Total Amount Not Equal</label>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td style="width:50%; float:left;">
                                    <div class="smallgrid-style" style="height:120px; width:560px;" ui-grid="submitDatasCount" ui-grid-resize-columns>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div style="margin-left:20px; margin-right:20px;">
                        <div class="grid-style" ui-grid="griddatas" ui-grid-resize-columns>
                        </div>
                    </div>
                    <!--<div class="row">
                        <div class="col-md-11" style="text-align:right">
                            <button id="btnSubmit" class="btn btn-primary" ng-click="submit('Aging')">Submit</button>
                        </div>
                    </div>-->
                    <div class="form-group col-md-12">
                        <div class="row" style="padding-left:20px; padding-right:20px;">
                            <div style="float:left; margin-right:20px;">
                                <label style="margin-top:27px; margin-bottom:14px; height:29px;">Show&nbsp;<span>{{agingFromItem}}</span>&nbsp;to&nbsp;<span>{{agingToItem}}</span>&nbsp;of&nbsp;<span>{{agingTotalNum}}</span>&nbsp;items</label>
                            </div>
                            <div style="float:left">
                                <pagination max-size="maxSize" items_per_page="itemsperpage" total-items="totalItems"
                                            ng-model="currentPage" ng-change="pageChanged()" class="pagination-sm" boundary-links="true"></pagination>
                            </div>

                            <div style="float:right">
                                <div style="float:left">
                                    <label style="margin-top: 27px; margin-bottom: 14px; margin-right:2px;">Page size:</label>
                                </div>
                                <div style="float:left">
                                    <select id="pagesize" name="pagesize" ng-model="selectedLevel" ng-options="s.id as s.levelName for s in levelList"
                                            ng-change="pagesizechange(selectedLevel)" class="form-control input-sm" style="margin-top: 20px; margin-bottom: 20px;"></select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div ng-if="isOneYearShow" style="padding-top:10px; margin-left:20px; margin-right:20px;">
                    <div class="row" style="text-align:right">
                        <label for="oneYearSales" style="padding-right:80px;">One Year Sales</label>
                        <label for="reportDate" style="padding-right:80px;">Report Date</label>
                    </div>
                    <div class="row" style="text-align:right">
                        <label id="oneYearSalesValue" style="padding-right:40px;"></label>
                        <label id="reportDateValue" style="padding-right:80px;"></label>
                    </div>
                    <div class="form-group col-md-12" style="padding-left:0px; padding-right:0px;">
                        <div class="grid-style" ui-grid="oneYear" ui-grid-resize-columns>
                        </div>
                    </div>
                    <!--<div class="row">
                        <div class="col-md-11" style="text-align:right">
                            <button id="btnOneYearSubmit" class="btn btn-primary" ng-click="submit('OneYearSalse')">Submit</button>
                        </div>
                    </div>-->
                    <div class="form-group col-md-12">
                        <div class="row">
                            <div style="float:left; margin-right:20px;">
                                <label style="margin-top:27px; margin-bottom:14px; height:29px;">Show&nbsp;<span>{{oneYearFromItem}}</span>&nbsp;to&nbsp;<span>{{oneYearToItem}}</span>&nbsp;of&nbsp;<span>{{oneYearTotalNum}}</span>&nbsp;items</label>
                            </div>
                            <div style="float:left">
                                <pagination max-size="oneyearmaxSize" items_per_page="oneyearitemsperpage" total-items="oneyeartotalItems"
                                            ng-model="oneyearcurrentPage" ng-change="oneyearpageChanged(oneyearcurrentPage)" class="pagination-sm" boundary-links="true"></pagination>
                            </div>
                            <div style="float:right">
                                <div style="float:left">
                                    <label style="margin-top: 27px; margin-bottom: 14px; margin-right:2px;">Page size:</label>
                                </div>
                                <div style="float:left">
                                    <select id="oneYearPageSize" name="oneYearPageSize" ng-model="selectedOneYearLevel" ng-options="s.id as s.levelName for s in levelList"
                                            ng-change="oneyearpagesizechange(selectedOneYearLevel)" class="form-control input-sm" style="margin-top: 20px; margin-bottom: 20px;"></select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</div>
<div id="downloadarea">
    <div>
        <h4 style="color:{{dlhcolor}}">
            <label id="downloadHisShow" class="modal-title" style="display:none; cursor:pointer;" ng-click="show('download')">
                <i class="fa fa-plus-square-o">&nbsp;DOWNLOAD HISTORY</i>
            </label>
            <label id="downloadHisHide" class="modal-title" style="cursor:pointer;" ng-click="hide('download')">
                <i class="fa fa-minus-square-o">&nbsp;DOWNLOAD HISTORY</i>
            </label>
        </h4>
    </div>
    <table id="tblDownloadArea" style="border: 1px #ececec solid; background-color: white; width: 1160px;">
        <tr>
            <td>
                <!--<div style="padding-bottom:10px">
                    <h4 class="modal-title" style="color:red;">Download history</h4>
                </div>-->
                <div style="margin-left:20px; margin-top:10px;">
                    <button id="refresh" class="btn-filter" style="width:220px;" ng-click="resetSearch()">
                        <i class="glyphicon glyphicon-stats"></i>&nbsp;&nbsp;Generate Consolidate Report
                    </button>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div style="padding-top:10px; margin-left:20px; margin-right:20px;">
                    <div class="smallgrid-style" style="min-height:200px;" ui-grid="hisArea" ui-grid-resize-columns>
                    </div>
                    <div class="form-group col-md-12">
                        <div class="row">
                            <div style="float:left; margin-right:20px;">
                                <label style="margin-top:27px; margin-bottom:14px; height:29px;">Show&nbsp;<span>{{hisFromItem}}</span>&nbsp;to&nbsp;<span>{{hisToItem}}</span>&nbsp;of&nbsp;<span>{{hisTotalNum}}</span>&nbsp;items</label>
                            </div>
                            <div style="float:left">
                                <pagination max-size="hisareamaxSize" items_per_page="hisareaitemsperpage" total-items="hisareatotalItems"
                                            ng-model="hisareacurrentPage" ng-change="hisareapageChanged()" class="pagination-sm" boundary-links="true"></pagination>
                            </div>
                            <div style="float:right">
                                <div style="float:left">
                                    <label style="margin-top: 27px; margin-bottom: 14px; margin-right:2px;">Page size:</label>
                                </div>
                                <div style="float:left">
                                    <select id="hisAreaPageSize" name="hisAreaPageSize" ng-model="selectedHisAreaLevel" ng-options="s.id as s.levelName for s in levelList"
                                            ng-change="hisareapagesizechange(selectedHisAreaLevel)" class="form-control input-sm" style="margin-top: 20px; margin-bottom: 20px;"></select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</div>